﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace stadt_verlangen
{
    class GameShell
    {

        public int runningGame;
        public int highScore;
        public bool want2quit;
        public SpinGame spinGame;

        public GameShell(Texture2D[] newContent, int gameType,SpriteFont newSpriteFont,int oldHighScore) 
        {
            runningGame = gameType;
            highScore = oldHighScore;
            want2quit = false;
            if (gameType == 1) 
            {
                spinGame = new SpinGame(newContent, newSpriteFont, oldHighScore);
            }
        }

        public void Update(GameTime gameTime) 
        {
            if (runningGame == 1) 
            {
                spinGame.Update(gameTime);
                if (spinGame.want2quit) 
                {
                    want2quit = true;
                    highScore=spinGame.highScore;
                }
            }
        }

        public void Draw(SpriteBatch spriteBatch,GameTime gameTime) 
        {
            if (runningGame == 1) 
            {
                spinGame.Draw(spriteBatch, gameTime);
            }
        }
    }
}
